#!/bin/bash
stop_syuee(){
    cd /home/syuee/server
    uwsgi --stop uwsgi/uwsigi.pid
}
backup_syuee(){
    cd /home/
    tar -zcf backup/\$(date +%F%H%M%S).tar.gz syuee/ 
}
clone_syuee(){
    cd /home/ 
    rm -rf syuee
    git clone https://gitee.com/RaYong8080/syuee.git
    cd /home/syuee/server
    pip3 install -r requirements.txt 
}
start_syuee(){
    cd /home/syuee/server
    uwsgi  --ini syuee.ini
}
main(){
    stop_syuee
    backup_syuee
    clone_syuee
    start_syuee
}
main

